package com.ruoyi.common.enums;


/**
 * cold_chain 异常处理
 *
 * @author shenjian26@hotmail.com
 * @date 2019-08-02 17:58
 */
public class CCException extends HjException {

    public CCException(String msg) {
        super(msg);
    }

    public CCException(ErrorBaseEnum err) {
        super(err.getDescription(), err.getValue());
    }

    public static enum ErrorBaseEnum {

        ERR_BASE_SUCCESS(200, "操作成功"),
        //系统异常
        ERR_EXCEPTION(CC + 1, "系统异常"),//系统报错
        ERR_BASE_FAIL(CC + 2, "登陆超时，请重新登录"),
        ERR_BASE_FAIL_INSERT(CC + 3, "保存失败"),
        ERR_BASE_FAIL_DELETE(CC + 4, "删除失败"),
        ERR_BASE_FAIL_UPDATE(CC + 5, "更新失败"),
        ERR_BASE_FAIL_SELECT(CC + 6, "获取失败"),
        ERR_FAIL_IS_NULL(CC + 7, "参数为空或参数非法"),
        ERR_FAIL_PARAMS_NULL(CC + 10, "请完善输入信息"),
        ERR_FAIL_UPLOAD(CC + 11, "上传失败"),
        ERR_FAIL_FAILD(CC + 12, "操作失败"),

        //基础业务
        ERR_FAIL_USER_IS_EXIST(BASE + 1, "该账号已被绑定"),
        ERR_FAIL_USER_IS_NOT_EXIST(BASE + 2, "用户不存在"),
        ERR_FAIL_PASSWORD_IS_ERROR(BASE + 3, "密码错误"),
        ERR_FAIL_GETPHONE_IS_NULL(BASE + 27, "手机号不能为空"),
        ERR_PHONEMESSAGE_IS_ERROR(BASE + 4, "短信验证码错误"),
        ERR_FAIL_PHONEMESSAGE_IS_NOT_EXIST(BASE + 300, "短信验证码不存在"),
        ERR_FAIL_PHONE_IS_ERROR(BASE + 5, "手机号格式错误"),
        ERR_FAIL_PASSWORD_IS_EXIST(BASE + 300, "密码格式错误"),
        ERR_FAIL_PHONEMESSAGE_IS_EXIST(BASE + 6, "短信验证码已发送"),
        ERR_FAIL_PHONE_IS_NULL(BASE + 7, "请先绑定手机号"),
        ERR_USER_TO_REGISTER(BASE + 9, "注册失败"),
        ERR_FAIL_COLLECT_SIZE_TOO_LONG(BASE + 11, "收藏条数过多，请先删除部分收藏奥"),
        ERR_FAIL_COLLECT_ALREADY_COLLECTED(BASE + 12, "已经收藏过了奥"),
        ERR_FAIL_BANKCARD_ERROR(BASE + 14, "银行卡号输入错误"),
        ERR_FAIL_BANK_CARD_SIZE_TOO_LONG(BASE + 15, "银行卡最多只能添加五张奥"),
        ERR_FAIL_BANK_CARD_PRINT(BASE + 16, "该卡已被绑定"),
        ERR_FAIL_IS_NOT_AUTHENTICATION(BASE + 17, "请先完成实名认证！"),
        ERR_FAIL_BANK_CARD_IS_NOT_EXIT(BASE + 18, "银行卡不存在"),
        ERR_FAIL_MONEY_TOO_MANY(BASE + 19, "提现金额数量过大"),
        ERR_FAIL_MONEY_NOT_SUPPORT(BASE + 20, "该额度暂不支持"),
        ERR_FAIL_PAYPASSWORD_NOT_EXIT(BASE + 21, "您还未设置支付密码"),
        ERR_ORDER_ALREADY_SHIPPED(BASE + 22, "今日已提醒卖家发货"),
        ERR_USER_TO_SHARECODE(BASE + 99, "没有此邀请码"),
        SUCCEED_USER_TO_SEND(BASE + 299, "发送验证码成功"),
        ERR_USER_TO_login(500, "该账号已被冻结"),
        ERR_USER_NOT_INSERT(29, "请先绑定手机号"),
        ERR_TODAY_SHARE_TOMANY(BASE + 23, "今日商品分享次数已达上限了喔~"),
        ERR_FAIL_BANKCARD_NAME_ERROR(BASE + 24, "银行卡识别失败，请重试"),
        ERR_FAIL_BANKCARD_AT_BRANCH_ERROR(BASE + 25, "所在支行不能为空"),
        ERR_EXPRESS_FAIL(BASE + 26, "抱歉，暂无查询记录"),
        ERR_OFFLINE_STORE_TOO_MANY(BASE + 28, "最多添加五张奥"),
        ERR_TASK_OMSORDER_IS_NULL(BASE + 1, "未查询到相关的订单信息"),
        ERR_TASK_ORDERTRACE_IS_NULL(BASE + 2, "未查询到相关的物流信息"),
        ERR_TASK_GOOD_NOT_FUNDS(BASE + 4, "商品不存在"),
        ERR_TASK_EXPRESS_TRACE_IS_NULL(BASE + 5, "快递公司和快递单号不能为空！"),
        ERR_FAIL_CONSIGNEER_NOT_NULL(BASE + 3, "请完善收件人信息！"),
        ERR_FAIL_CONSIGNEER_COUNT_TOO_MANY(BASE + 6, "收件地址最多添加5条"),
        ERR_FAIL_DELETE_ORDER_FAIL(BASE + 7, "当前订单不能删除"),
        ERR_FAIL_ORDER_AFTER_HAVE(BASE + 12, "该订单已申请售后"),
        ERR_ACCOUNT_IS_EXIT(BASE + 8, "该账号已绑定手机号"),
        ERR_CART_IS_MIN(BASE + 9, "购物车数量已经是最低了奥"),
        ERR_IMAGE_IS_NULL(BASE + 10, "请选择要上传的图片"),
        ERR_FAIL__ORDER_NOT_EXIT(BASE + 11, "订单不存在"),
        ERR_FAIL_ORDER_NOT_DELETE(BASE + 13, "当前订单不能删除"),
        ERR_FAIL_ALREADY_BIND(BASE + 14, "您已绑定上级信息"),
        ERR_FAIL_NOT_BIND_MINE(BASE + 15, "不能绑定您自己的账号奥"),
        ERR_FAIL_BIND_NOT_ALLOWED(BASE + 16, "不能绑定您下级用户的账号奥"),
        ERR_FAIL_BIND_PASSWORD_ALLOWED(BASE + 17, "当前密码不能与新密码重复哟~"),
        ERR_FAIL_GOODS_NOT_EXITS(BASE + 18, "宝贝已经抢没啦~");


        private int value;
        private String description;

        ErrorBaseEnum(int value, String description) {
            this.value = value;
            this.description = description;
        }

        public int getValue() {
            return value;
        }

        public void setValue(int value) {
            this.value = value;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }
    }
}
